// FDEfilter.cpp : Defines the entry point for the DLL application.
//
#pragma once
#include "stdafx.h"
#include "FFEncodeFilter.h"
#include "FFEncodeInputPin.h"

#ifdef _MANAGED
#pragma managed(push, off)
#endif
//
const AMOVIESETUP_MEDIATYPE sudPinTypes[] =
{
	{ &MEDIATYPE_Video, &MEDIASUBTYPE_NULL },	
	{ &MEDIATYPE_Audio, &MEDIASUBTYPE_NULL },

};


const AMOVIESETUP_PIN sudPins =
{
	L"Input",                   // Pin string name
	FALSE,                      // Is it rendered
	FALSE,                      // Is it an output
	FALSE,                      // Allowed none
	FALSE,                      // Likewise many
	&CLSID_NULL,                // Connects to filter
	L"Output",                  // Connects to pin
	2,                          // Number of types
	sudPinTypes                // Pin information
};

const AMOVIESETUP_FILTER sudFilter =
{
	&CLSID_FDEMuxFilter,                // Filter CLSID
	FDE_FILTER_NAME,                    // String name
	MERIT_DO_NOT_USE,           // Filter merit
	1,                          // Number pins
	&sudPins                    // Pin details
};


CFactoryTemplate g_Templates[] =
{
	{FDE_FILTER_NAME, &CLSID_FDEMuxFilter, CFFEncodeFilter::CreateInstance, NULL, &sudFilter}
};

int g_cTemplates = 1;

STDAPI DllRegisterServer()
{
	return AMovieDllRegisterServer2( TRUE );

} // DllRegisterServer


//
// DllUnregisterServer
//
STDAPI DllUnregisterServer()
{
	return AMovieDllRegisterServer2( FALSE );

} // DllUnregisterServer



extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID);

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
  return DllEntryPoint((HINSTANCE)(hModule), ul_reason_for_call, lpReserved);

}

#ifdef _MANAGED
#pragma managed(pop)
#endif

